function [P2010,P2011,P2012]=Pij(Students,Options)
d2010=p2010(Students,Options);
P2010=max(zeros(size(d2010(:,:,1))),(repmat(Options{Options.proceso==2010,{'valor_arancel'}}',[size(Students(Students.proceso==2010,:),1),1]).*(1-d2010(:,:,1)))-d2010(:,:,2)...
    -Students{Students.proceso==2010,{'aid_amount'}}-Students{Students.proceso==2010,{'reference_tuition'}}*Options{Options.proceso==2010,{'ref'}}')...
    +repmat(Options{Options.proceso==2010,{'valor_matricula'}}',[size(Students(Students.proceso==2010,:),1),1])-d2010(:,:,3);
d2011=p2011(Students,Options);
P2011=max(zeros(size(d2011(:,:,1))),(repmat(Options{Options.proceso==2011,{'valor_arancel'}}',[size(Students(Students.proceso==2011,:),1),1]).*(1-d2011(:,:,1)))-d2011(:,:,2)...
    -Students{Students.proceso==2011,{'aid_amount'}}-Students{Students.proceso==2011,{'reference_tuition'}}*Options{Options.proceso==2011,{'ref'}}')...
    +repmat(Options{Options.proceso==2011,{'valor_matricula'}}',[size(Students(Students.proceso==2011,:),1),1])-d2011(:,:,3);
d2012=p2012(Students,Options);
P2012=max(zeros(size(d2012(:,:,1))),(repmat(Options{Options.proceso==2012,{'valor_arancel'}}',[size(Students(Students.proceso==2012,:),1),1]).*(1-d2012(:,:,1)))-d2012(:,:,2)...
    -Students{Students.proceso==2012,{'aid_amount'}}-Students{Students.proceso==2012,{'reference_tuition'}}*Options{Options.proceso==2012,{'ref'}}')...
    +repmat(Options{Options.proceso==2012,{'valor_matricula'}}',[size(Students(Students.proceso==2012,:),1),1])-d2012(:,:,3);
end